
#include <ctime>
#include <limits>

namespace std { using ::clock_t; using ::clock; }
class Timer
{
 public:
         Timer() { m_StartTime = std::clock(); } 
 
		 void   Restart() { m_StartTime = std::clock(); } 
  
		  double Elapsed() const                 
		  { return  double(std::clock() - m_StartTime) / CLOCKS_PER_SEC; }

		  double Elapsed_max() const   
		  {
			return (double((std::numeric_limits<std::clock_t>::max)())
							 - double(m_StartTime)) / double(CLOCKS_PER_SEC); 
		  }

		  double Elapsed_min() const           
		   { return double(1)/double(CLOCKS_PER_SEC); }

 private:
	 std::clock_t m_StartTime;
}; // timer


